package com.xiaoxu.content.feignclient;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * @author xiaoxu
 * @version 1.0
 * @description TODO
 * @date 2023/1/30 14:40
 */
@Slf4j
public class MediaServiceClientFallBackFactory implements FallbackFactory<MediaServiceClient> {
    @Override
    public MediaServiceClient create(Throwable throwable) {
        return (upload, folder, objectName) -> {
            log.debug("远程调用媒资管理服务熔断异常: {}",throwable.getMessage());
            throwable.printStackTrace();
            return null;
        };
    }
}
